# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=networkmanager-l2tp
pkgver=1.20.14
pkgrel=0
pkgdesc="L2TP support for NetworkManager"
url="https://github.com/nm-l2tp/NetworkManager-l2tp"
license="GPL-2.0-only"
arch="all"
makedepends="
	autoconf
	automake
	gettext-dev
	glib-dev
	gtk+3.0-dev
	gtk4.0-dev
	libnma-dev
	libsecret-dev
	libtool
	nss-dev
	openssl-dev>3
	ppp-dev
	python3
	"
depends="ppp xl2tpd strongswan"
source="https://github.com/nm-l2tp/NetworkManager-l2tp/releases/download/$pkgver/NetworkManager-l2tp-$pkgver.tar.xz"
options="!check" #no check
builddir="$srcdir/NetworkManager-l2tp-$pkgver"
subpackages="$pkgname-lang"

build() {
	./autogen.sh
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--libexecdir=/usr/lib/NetworkManager \
		--with-pppd-plugin-dir=/usr/lib/pppd/2.5.0 \
		--with-gtk4
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
cddb33bb41b8a865c2c716365598f18daee734c4e10eee3dc5cdf4a4a2184eeb4d61a6ff9b23aab814bde6e67def714a319e6ca50323af24d5f1f265163aa5f5  NetworkManager-l2tp-1.20.14.tar.xz
"
